<style scoped>
    .expand-row{
        margin-bottom: 16px;
        text-align: center;
    }
</style>
<template>
    <div>
        <Row class="expand-row" v-if="list.length == 0">
            <Col span="24">
                <span class="expand-key">暂无同行人</span>
            </Col>
        </Row>
        <Row class="expand-row" v-for="(item,index) in list" :key="index">
            <Col span="8">
                <span class="expand-key">同行人姓名: </span>
                <span class="expand-value">{{ item.passenger_name }}</span>
            </Col>
            <Col span="8">
                <span class="expand-key">同行人身份证号: </span>
                <span class="expand-value">{{ item.passenger_cardno }}</span>
            </Col>
            <Col span="8">
                <span class="expand-key">同行人电话: </span>
                <span class="expand-value">{{ item.passenger_tel }}</span>
            </Col>
        </Row>
    </div>
</template>
<script>
import {
  getCargoTransportationInfoByCode
} from '../../api/system/record'
export default {
  props: {
    row: Object
  },
  data () {
    return {
      list: []
    }
  },
  async mounted () {
    console.log(this.row)
    if (this.row) {
      const res = await getCargoTransportationInfoByCode({ register_code: this.row.register_code })
      this.list = res.data.data.peerList
      console.log(res.data.data.peerList)
    }
  }
}
</script>
